home *** CD-ROM | disk | FTP | other *** search
- Path: comsearch.com!tnasca
- From: Thuan Nguyen <thnguyen@comsearch.com>
- Newsgroups: comp.lang.c,comp.lang.c++,comp.lang.perl
- Subject: Re: Stupid array problems
- Date: 17 Jan 1996 23:02:42 GMT
- Organization: ComSearch, Inc
- Message-ID: <4djv6i$ejc@gateway.comsearch.com>
- References: <4d9b9v$14n@paperboy.ids.net> <4dbfd1$2hpc@news.gate.net> <4dc5fv$qdr@newsreader.wustl.edu>
- NNTP-Posting-Host: arcturus.comsearch.com
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 1.1N (X11; I; SunOS 4.1.4 sun4c)
- X-URL: news:4dc5fv$qdr@newsreader.wustl.edu
-
- kln@howdy.wustl.edu (Krishnamoorthy Lakshminarayan) wrote:
- > Hello:
- >
- > Try this:
- >
- > void delete_array_element (char **array, //The array of strings
- > int max, // total strings in array
- > int num_del) //index you want deleted
- > {
- > for (int i=max-1; i>num_del; i++) //max-1, because you've deleted
- ^^^^^
- Isnt suppose to be i--
- > {
- > array[i] = array[i-1];
- > }
- >
- > }
- >
- > -Lakshmi N.
-
-